dtreeviz

Regressor

Description: The Python-based dtreeviz library is a visualization tool for decision trees. It allows users to create interactive visualizations of decision trees, which can be used to gain insights into the structure and behavior of these models. Additionally, dtreeviz provides a range of features that enable users to customize their visualizations, making it a powerful tool for data exploration and analysis. The dtreeviz library in Python is compatible with several decision tree libraries, including scikit-learn, XGBoost, TensorFlow. https://explained.ai/decision-tree-viz/
Description: There are few functions for general visualization of the given model in the dtreeviz library which we can see bellow.

Creating the sklearn.DecisionTreeRegressor Instance

Description: Since the library dtreeviz is compatible with decision trees from skicit-learn, we will use self-trained instance from this library.
Information: For further visualizations fit() function to the model needs to be runned.

Creating the dtreeviz Shadow Tree Wrapping the sklearn.DecisionTreeRegressor

Description: 'The decision trees for classifiers and regressors from scikit-learnare built for efficiency, not necessarily ease of tree walking or extracting node information. We created dtreeviz.shadow.ShadowDecTree and dtreeviz.shadow.ShadowDecTreeNode classes as an easy-to-use (traditional binary tree) wrapper for all tree information. Here's how to create a shadow tree from a scikit classifier or regressor tree model: shadow_tree = ShadowDecTree(tree_model, X_train, y_train, feature_names, class_names)' https://explained.ai/decision-tree-viz/

Standard Visualization

Description Horizontal dashed lines in the scatterplots of individual nodes indicate the target mean for the left and right buckets in decision nodes; a vertical dashed line indicates the split point in feature space. The black wedge highlights the split point and identifies the exact split value. Leaf nodes indicate the target prediction (mean) with a dashed line.

Left-Right Orientation Visualization

Description Picture preserves the same node graphs but has the left-right orientation insted of typical top-down orientation.